package su.user.dto;

import su.tool.SuIntUtils;
import su.user.entity.UserCustomer;

public class UserCustomerDto {

	private String id;

	private String customername;//客户名称

	private String jianpin;//简拼

	private String ywyid;//业务员id

	private String provientid;//省份id
	
	private String postcode;//邮编

	private String address;//地址
	
	private String tel;//电话

	private String fax;//传真
	
	private String taxnum;//税号

	private String bank;//开户银行
	
	private String banknum;//银行开户号
	
	private String shipmenttype;//发货方式
	
	private String shipmentaddr;//收货地址
	
	private String invoice;//（常规）是否开票,1是2否

	private String customerdesc;//备注
	
	private String status;//状态，0删除，1有效

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCustomername() {
		return customername;
	}

	public void setCustomername(String customername) {
		this.customername = customername;
	}

	public String getJianpin() {
		return jianpin;
	}

	public void setJianpin(String jianpin) {
		this.jianpin = jianpin;
	}

	public String getYwyid() {
		return ywyid;
	}

	public void setYwyid(String ywyid) {
		this.ywyid = ywyid;
	}

	public String getProvientid() {
		return provientid;
	}

	public void setProvientid(String provientid) {
		this.provientid = provientid;
	}

	public String getPostcode() {
		return postcode;
	}

	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public String getTaxnum() {
		return taxnum;
	}

	public void setTaxnum(String taxnum) {
		this.taxnum = taxnum;
	}

	public String getBank() {
		return bank;
	}

	public void setBank(String bank) {
		this.bank = bank;
	}

	public String getBanknum() {
		return banknum;
	}

	public void setBanknum(String banknum) {
		this.banknum = banknum;
	}

	public String getShipmenttype() {
		return shipmenttype;
	}

	public void setShipmenttype(String shipmenttype) {
		this.shipmenttype = shipmenttype;
	}

	public String getShipmentaddr() {
		return shipmentaddr;
	}

	public void setShipmentaddr(String shipmentaddr) {
		this.shipmentaddr = shipmentaddr;
	}

	public String getInvoice() {
		return invoice;
	}

	public void setInvoice(String invoice) {
		this.invoice = invoice;
	}

	public String getCustomerdesc() {
		return customerdesc;
	}

	public void setCustomerdesc(String customerdesc) {
		this.customerdesc = customerdesc;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public UserCustomer toEntity(){
		UserCustomer entity = new UserCustomer();
		entity.setAddress(this.address.trim());
		entity.setBank(this.bank.trim());
		entity.setBanknum(this.banknum.trim());
		entity.setCustomerdesc(this.customerdesc.trim());
		entity.setCustomername(this.customername.trim());
		entity.setFax(this.fax.trim());
		entity.setId(SuIntUtils.getInt(this.id.trim()));
		entity.setInvoice(this.invoice.trim());
		entity.setJianpin(this.jianpin.trim());
		entity.setPostcode(this.postcode.trim());
		entity.setProvientid(SuIntUtils.getInt(this.provientid.trim()));
		entity.setShipmentaddr(this.shipmentaddr.trim());
		entity.setShipmenttype(this.shipmenttype.trim());
		entity.setStatus(SuIntUtils.getInt(this.status.trim()));
		entity.setTaxnum(this.taxnum.trim());
		entity.setTel(this.tel.trim());
		entity.setYwyid(SuIntUtils.getInt(this.ywyid.trim()));
		return entity;
	}
	
}
